package com.cz.zslu.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单评价统计
 * </p>
 *
 * @author Brue 2019-05-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("order_evaluate_statistics")
@AllArgsConstructor
@NoArgsConstructor
public class OrderEvaluateStatistics extends SuperEntity<OrderEvaluateStatistics> {

    private static final long serialVersionUID = 1L;

    /**
     * 状态 0有效 1无效
     */
    @JSONField(serialize = false)
    @TableLogic
    @JsonIgnore
    private Integer state=0;

    /**
     * 订单id
     */
    @ApiModelProperty("订单id")
    @TableField("order_id")
    private Integer OrderId;

    /**
     * 好评度:算法，每个用户的评星相加除以5，保留一位小数
     */
    @ApiModelProperty("好评度")
    @TableField("praise_degree")
    private Double praiseDegree;


    /**
     * 好评:算法4星和5星的数量加起来除以整个的评论数量*100%
     */
    @ApiModelProperty("好评")
    @TableField("good_reputation")
    private Double goodReputation;

    /**
     * 中评:算法3星的数量加起来除以整个的评论数量*100%
     */
    @ApiModelProperty("中评")
    @TableField("medium_review ")
    private Double mediumReview ;

    /**
     * 差评:算法，1星和2星的数量加起来除以整个的评论数量*100%
     */
    @ApiModelProperty("差评")
    @TableField("negative_comment ")
    private Double negativeComment ;


    /**
     * 总评价数
     */
    @ApiModelProperty("总评价数")
    @TableField("total_praise ")
    private Integer totalPraise ;


}
